package com.eco.fanliapp.admin.controller.web;

import com.eco.fanliapp.common.response.ServerResponse;
import com.eco.fanliapp.entity.KillPointsCommission;
import com.eco.fanliapp.service.IKillPointsCommissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/web/killPointsCommission")
public class KillPointsCommissionController {

    @Autowired
    private IKillPointsCommissionService killPointsCommissionService ;

    /**
     *  新写入数据库记录,kill_points_commission
     *
     * @param killPointsCommission
     */
    @PostMapping("/insertKillRipeScheme")
    public ServerResponse insertKillRipeScheme(@RequestBody KillPointsCommission killPointsCommission) {

        return killPointsCommissionService.insertKillRipeScheme(killPointsCommission);

    }

    /**
     *  根据主键来更新符合条件的数据库记录,kill_points_commission
     *
     * @param killPointsCommission
     */
    @PostMapping("/updateByPrimaryKey")
    public ServerResponse updateByPrimaryKey(@RequestBody KillPointsCommission killPointsCommission){
       return killPointsCommissionService.updateByPrimaryKey(killPointsCommission);
    }
}
